#include<bits/stdc++.h>
using namespace std;

void solution(int num, int n, int m, vector<string> s)
{
	int flag = 0;
	for(int i = 0, j = n-1;i < j;i++, j--)
		for(int k = 0;k < m;k++)
			if(s[i][k] != s[j][k])
			{
				flag |= 1;
				break;
			}
	for(int i = 0, j = m-1;i < j;i++, j--)
		for(int k = 0;k < n;k++)
			if(s[k][i] != s[k][j])
			{
				flag |= 2;
				break;
			}
	for(int i = 0, j = n-1;i < n && j >= 0;i++, j--)
		for(int ik = 0, jk = m-1;ik < m && jk >= 0;ik++, jk--)
			if(s[i][ik] != s[j][jk])
			{
				flag |= 4;
				break;
			}
	if(num)
		cout<<endl<<endl;
	if(flag == 0)
		cout<<"xiaobaodi!\ndabaodi!\nwuhu!";
	else if(flag == (1 << 3)-2)
		cout<<"xiaobaodi!";
	else if(flag == (1 << 2)-1)
		cout<<"wuhu!";
	else if(flag == 5)
		cout<<"dabaodi!";
	else if(flag == 1)
		cout<<"dabaodi!\nwuhu!";
	else if(flag == 2)
		cout<<"xiaobaodi!\nwuhu!";
	else if(flag == 4)
		cout<<"xiaobaodi!\ndabaodi!";
	else
		cout<<"***,tuiqian!";
	return ;
}

int main()
{
	int n, m, num = 0;
	while(cin>>n>>m)
	{
		string a;
		vector<string> s;
		for(int i = 1;i <= n;i++)
		{
			cin>>a;
			s.push_back(a);
		}
		solution(num, n, m, s);
		num++;
	}
	return 0;
}

